package com.wuchao.spring.print;

import com.wuchao.spring.ioc.A;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.text.MessageFormat;

/**
 * @Author wuchao66
 * @Date 2023/9/21 15:39
 * @PackageName:com.wuchao.spring.print
 * @ClassName: Printer
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
@Service
public class Printer1 {//ioc 1get/set  传参在外面

    @Resource
    private A4 a4;//ioc
    @Resource
    private Color color;

    public  void show(){
        //String.format("%s油墨在%s纸上打印",ink.getInk(),paper.getPaper());
        System.out.println( MessageFormat.format("167{0}油墨在{1}纸上打印",color.getInk(),a4.getPaper()));
    }
}
